#include <stdio.h>

void pointerswap(char*, char*);

int main()
{
    char m = 1, n = 2;
    printf("m:%d;n:%d\n", m, n);
    pointerswap(&m, &n);
    printf("m:%d;n:%d\n", m, n);
    return 0;
}

void pointerswap(char* m, char* n)
{
    char middle = *m;
    *m = *n;
    *n = middle;
}